//
//  CGFloat+Extension.swift
//  Library_y
//
//  Created by JC on 2023/6/6.
//

import Foundation
import UIKit

// MARK: - CGFloat常用类型转换
public extension CGFloat {
    
    /// CGFloat 转 Int
    var toInt: Int {
        return Int(self)
    }
    
    /// CGFloat 转 Double
    var toDouble: Double {
        return Double(self)
    }
    
    /// CGFloat 转 String
    var toString: String {
        return String(format: "%f", self)
    }
}
